package day240607.hw;


import java.io.*;
import java.util.List;

public class FileStorage implements Storage {
    @Override
    public void storage(List<Content> s) {
        File file = new File("ice1/src/save.txt");
        try (
                FileWriter fileWriter = new FileWriter(file)
        ) {
            for (Content content : s) {
                fileWriter.write(content.toString() + "\n");
            }
        } catch (IOException e) {
            throw new RuntimeException(e);
        }
    }
}